/*Promises*/
function getDataUsingPromises() { 
	const url = 'https://api.github.com/users/mistyblunch'
	fetch(url)
	.then(res => res.json())
	.then(json => console.log(json))
}

getDataUsingPromises()

/*Async and Await*/
async function getDataUsingAsyncAwait() {
    const data = await fetch('https://api.github.com/users/mistyblunch')
    const datajson = await data.json()
    return datajson
  }

getDataUsingAsyncAwait()